function GM:OnNPCKilled(npcTarget, entKiller, weapon)
	if(npcTarget.Name) then
		local tblWaveTable = WaveTable(GAMEMODE.OnWave)
		tblWaveTable.SpawnedNPCs =  tblWaveTable.SpawnedNPCs - 1
	end
end


local function PlayerAdjustDamage(entVictim, entInflictor, entAttacker, intAmount, tblDamageInfo)
	if !entVictim:IsPlayer() then return end
	if !entAttacker:IsPlayer() && entAttacker:GetOwner():IsPlayer() then
		entAttacker = entAttacker:GetOwner()
	end
end
hook.Add("EntityTakeDamage", "PlayerAdjustDamage", PlayerAdjustDamage)